import React from "react";
import { C1 } from "../page4/C1";

export default class Page5 extends React.Component{
  public state = {
    charts: JSON.parse(localStorage.getItem('charts') || '')
  }

  public getCmp(name:string):any{
    if (name === 'C1') {
      return C1
    }
    
  }

  public render(){
    return <div style={{ width: 1000, height: 500, background: 'red', position: 'relative' }}>
            {this.state.charts.map((c:any) => {
          const C = this.getCmp(c.name)
          return <C style={c.style} key={name} />
        })}
    </div>
  }
}